package cn.yeziji.forum.exception;

import cn.yeziji.forum.common.enums.ForumCommonStatus;
import lombok.*;

/**
 * @author gzkemays
 * @since 2021/12/22 17:07
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ForumException extends RuntimeException {
    private int code;
    private String msg;
    public ForumException (ForumCommonStatus status) {
        this.code = status.getCode();
        this.msg = status.getMsg();
    }

}
